package org.acghub.reflection.module;

import org.acghub.common.ObjectUtils;
import org.reflections.Reflections;

/**
 * @Project demos
 * @Package org.acghub.reflection
 * @Desc
 * @Author Administrator
 * @Date 2025/7/16/星期三 10:11
 * @Version 1.0
 */
public abstract class AbstractReflectionModule implements ReflectionModule {


    private Reflections reflections;

    @Override
    public Reflections reflections() {
        return reflections;
    }

    final void setReflections(Reflections reflections) {
        ObjectUtils.assertNonNull(reflections, "reflections");
        this.reflections = reflections;
    }

    final Reflections replaceReflections(Reflections reflections) {
        ObjectUtils.assertNonNull(reflections, "reflections");
        Reflections old = this.reflections;
        this.reflections = reflections;
        return old;
    }
}
